<!--- Param incoming vars --->
<cfparam name="category_id" type="numeric" />
<!--- Get the category record --->
<cfquery name="qCat" datasource="sixdegreesimprov">
	SELECT category_id, category_name
	FROM igdb_categories
	WHERE (category_id = <cfqueryparam cfsqltype="cf_sql_integer" value="#category_id#" />)
</cfquery>
<!--- Get all the games in that category --->
<cfquery name="qGames" datasource="sixdegreesimprov">
	SELECT g.game_id, g.game_name, g.descrip
	FROM igdb_game_category gc inner join
		igdb_games g on gc.game_id = g.game_id
	WHERE (gc.category_id = <cfqueryparam cfsqltype="cf_sql_integer" value="#category_id#" />)
</cfquery>

<cfoutput>
	<div class="post">
		<h1 class="title"><a href="##">The &quot;#qCat.category_name#&quot; category</a></h1>
		<div class="entry">
			<p>
				Here is a listing of all the games that are in the category you chose. There are so many games
				in the improv world, and many variations on each, so before you get your panties in a bunch
				over something you consider to be a mis-categorization you should know we're already aware
				that this is just one of the many possible interpretations of these games.
			</p>
		</div>
	</div>
	<div class="post">
		<h2 class="title"><a href="##">Games in the &quot;#qCat.category_name#&quot; category</a></h2>
		<p class="byline"><small>Note that games can exist in more than one category!</small></p>
		<div class="entry">
			<cfloop query="qGames">
				<h3><a href="gameInfo.cfm?game_id=#game_id#">#game_name#</a></h3>
				<blockquote>#descrip#</blockquote>
			</cfloop>
		</div>
	</div>
</cfoutput>